<template>
	<view>
		<view class="check_box check_empty"  v-show="!allchecked && !isindeter" @click="test" ></view>
		<view class="check_box check_half u-flex-center" v-if="isindeter">
			<u-icon name="minus" color="#fff" size="20"></u-icon>
		</view>
		<view class="check_box check_fill u-flex-center" v-if="allchecked">
			<u-icon name="checkbox-mark" color="#fff" size="20"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		name: "checkcontent",
		components: {
			
		},
		props: {
			isindeter: {
				type: Boolean | Number,
				default: false,
			},
			
			allchecked: {
				type: Boolean | Number,
				default: false,
			},
			info: {
				type: Object,
				default: {},
			}
		},
		watch: { 
			isindeter: {
				handler(newVal, oldVal) {
					//console.log('isindeter', newVal, oldVal)
				},
				deep: true 
			},
			allchecked: {
				handler(newVal, oldVal) {
					//console.log('allchecked', newVal, oldVal)
				},
				deep: true 
			},
			info: {
				handler(newVal, oldVal) {
					//console.log('info', newVal, oldVal)
				},
				deep: true 
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			test(){
				console.log('测试')
			}
		},
	}
</script>

<style scoped lang="scss">
	// .disnone{
	// 	display: none !;
	// }
	.FlexRow{
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	
	.check_box{
		width: 32rpx;
		height: 32rpx;
		border-radius: 4rpx;
		margin-right: 12rpx;
		background-color: #fff;
	}
	.check_empty{
		border: 1rpx solid #dcdfe6;
	}
	.check_half{
		background:#fd7400;
	}
	.check_fill{
		background: #fd7400;
	}
</style>